3.3.89 \(\int \frac {(e+f x)^m \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx\) [289]

Optimal. Leaf size=154 \[ \frac {(e+f x)^{1+m}}{a f (1+m)}+\frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right )}{2 a d} \]

[Out]

(f*x+e)^(1+m)/a/f/(1+m)+1/2*exp(I*(c-d*e/f))*(f*x+e)^m*GAMMA(1+m,-I*d*(f*x+e)/f)/a/d/((-I*d*(f*x+e)/f)^m)+1/2*
(f*x+e)^m*GAMMA(1+m,I*d*(f*x+e)/f)/a/d/exp(I*(c-d*e/f))/((I*d*(f*x+e)/f)^m)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4619, 32, 3389, 2212} \begin {gather*} \frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \text {Gamma}\left (m+1,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \text {Gamma}\left (m+1,\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {(e+f x)^{m+1}}{a f (m+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^m*Cos[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

(e + f*x)^(1 + m)/(a*f*(1 + m)) + (E^(I*(c - (d*e)/f))*(e + f*x)^m*Gamma[1 + m, ((-I)*d*(e + f*x))/f])/(2*a*d*
(((-I)*d*(e + f*x))/f)^m) + ((e + f*x)^m*Gamma[1 + m, (I*d*(e + f*x))/f])/(2*a*d*E^(I*(c - (d*e)/f))*((I*d*(e
+ f*x))/f)^m)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2212

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(-F^(g*(e - c*(f/d))))*((c
+ d*x)^FracPart[m]/(d*((-f)*g*(Log[F]/d))^(IntPart[m] + 1)*((-f)*g*Log[F]*((c + d*x)/d))^FracPart[m]))*Gamma[m
 + 1, ((-f)*g*(Log[F]/d))*(c + d*x)], x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rule 3389

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Dist[I/2, Int[(c + d*x)^m/E^(I*(e + f*x))
, x], x] - Dist[I/2, Int[(c + d*x)^m*E^(I*(e + f*x)), x], x] /; FreeQ[{c, d, e, f, m}, x]

Rule 4619

Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[1/a, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*S
in[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x)^m \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int (e+f x)^m \, dx}{a}-\frac {\int (e+f x)^m \sin (c+d x) \, dx}{a}\\ &=\frac {(e+f x)^{1+m}}{a f (1+m)}-\frac {i \int e^{-i (c+d x)} (e+f x)^m \, dx}{2 a}+\frac {i \int e^{i (c+d x)} (e+f x)^m \, dx}{2 a}\\ &=\frac {(e+f x)^{1+m}}{a f (1+m)}+\frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right )}{2 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.90, size = 187, normalized size = 1.21 \begin {gather*} \frac {(e+f x)^m \left (\frac {2 d (e+f x)}{f (1+m)}+\left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right ) \left (\cos \left (c-\frac {d e}{f}\right )-i \sin \left (c-\frac {d e}{f}\right )\right )+\left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right ) \left (\cos \left (c-\frac {d e}{f}\right )+i \sin \left (c-\frac {d e}{f}\right )\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}{2 a d (1+\sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^m*Cos[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

((e + f*x)^m*((2*d*(e + f*x))/(f*(1 + m)) + (Gamma[1 + m, (I*d*(e + f*x))/f]*(Cos[c - (d*e)/f] - I*Sin[c - (d*
e)/f]))/((I*d*(e + f*x))/f)^m + (Gamma[1 + m, ((-I)*d*(e + f*x))/f]*(Cos[c - (d*e)/f] + I*Sin[c - (d*e)/f]))/(
((-I)*d*(e + f*x))/f)^m)*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2)/(2*a*d*(1 + Sin[c + d*x]))

________________________________________________________________________________________

Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int \frac {\left (f x +e \right )^{m} \left (\cos ^{2}\left (d x +c \right )\right )}{a +a \sin \left (d x +c \right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^m*cos(d*x+c)^2/(a+a*sin(d*x+c)),x)

[Out]

int((f*x+e)^m*cos(d*x+c)^2/(a+a*sin(d*x+c)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^m*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

integrate((f*x + e)^m*cos(d*x + c)^2/(a*sin(d*x + c) + a), x)

________________________________________________________________________________________

Fricas [A]
time = 0.11, size = 136, normalized size = 0.88 \begin {gather*} \frac {{\left (f m + f\right )} e^{\left (-\frac {f m \log \left (\frac {i \, d}{f}\right ) + i \, c f - i \, d e}{f}\right )} \Gamma \left (m + 1, \frac {i \, d f x + i \, d e}{f}\right ) + {\left (f m + f\right )} e^{\left (-\frac {f m \log \left (-\frac {i \, d}{f}\right ) - i \, c f + i \, d e}{f}\right )} \Gamma \left (m + 1, \frac {-i \, d f x - i \, d e}{f}\right ) + 2 \, {\left (d f x + d e\right )} {\left (f x + e\right )}^{m}}{2 \, {\left (a d f m + a d f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^m*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*((f*m + f)*e^(-(f*m*log(I*d/f) + I*c*f - I*d*e)/f)*gamma(m + 1, (I*d*f*x + I*d*e)/f) + (f*m + f)*e^(-(f*m*
log(-I*d/f) - I*c*f + I*d*e)/f)*gamma(m + 1, (-I*d*f*x - I*d*e)/f) + 2*(d*f*x + d*e)*(f*x + e)^m)/(a*d*f*m + a
*d*f)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (e + f x\right )^{m} \cos ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**m*cos(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Integral((e + f*x)**m*cos(c + d*x)**2/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^m*cos(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

integrate((f*x + e)^m*cos(d*x + c)^2/(a*sin(d*x + c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2\,{\left (e+f\,x\right )}^m}{a+a\,\sin \left (c+d\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^2*(e + f*x)^m)/(a + a*sin(c + d*x)),x)

[Out]

int((cos(c + d*x)^2*(e + f*x)^m)/(a + a*sin(c + d*x)), x)

________________________________________________________________________________________